package cn.hchaojie.spring.day01.config;

import java.text.DateFormat;
import java.text.SimpleDateFormat;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration		// 配置类
@ComponentScan(basePackages = {"cn.hchaojie.spring.day01.beans"})
public class AppConfig {
	
	// 如何让spring容器创建和管理第三方jar包里面的类
	@Bean
	public DateFormat createDateFormatBean() {
		return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	}
}
